package com.yzf.wisecoder.wisecoderservice.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yzf.wisecoder.wisecoderstorage.mysql.entity.ViewDbEntity;

import java.util.List;

/**
 * @author jianghuiyong
 * @email jianghuiyong@yunzhangfang.com
 * @date 2020-05-12 10:20:48
 */
public interface ViewDbService extends IService<ViewDbEntity> {

    /**
     * 查询项目数据源配置列表
     *
     * @param projectId
     * @return
     */
    List<ViewDbEntity> queryList(Long projectId);

    /**
     * 保存或修改模板数据源
     *
     * @param viewDbEntity
     * @return
     */
    boolean saveOrUpdateViewDb(ViewDbEntity viewDbEntity);

    /**
     * 删除项目下的数据源信息
     *
     * @param projectIds
     * @return
     */
    boolean removeByProjectId(List<Long> projectIds);

    /**
     * 查找Db信息
     * @param dbIds
     * @return
     */
    List<ViewDbEntity> queryByDbIds(List<Long> dbIds);
}

